package com.cc.controller;

import com.cc.comm.responce.PageResult;
import com.cc.comm.responce.R;
import com.cc.model.dto.InventoryQuery;
import com.cc.model.vo.InventoryVo;
import com.cc.service.InventoryService;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 库存表 前端控制器
 * </p>
 *
 * @author 晓东√
 * @since 2025-09-19 11:18
 */
@RestController
@RequestMapping("/inventory")
@Tag(name = "库存控制器")
public class InventoryController {
    @Autowired
    private InventoryService inventoryService;

    //分页展示库存列表
    @PostMapping("/list")
    public R<PageResult<InventoryVo>> pageList(@RequestBody InventoryQuery inventoryQuery) {
        // 分页展示库存列表功能实现
        PageResult<InventoryVo> inventoryPage =inventoryService.pageList(inventoryQuery);
        return R.success(inventoryPage);
    }



}
